<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - mbi.info - /usr/include/c++/4.4.1/ext/type_traits.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../../../index.html">directory</a> - <a href="index.html">usr/include/c++/4.4.1/ext</a> - type_traits.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>mbi.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-01-23</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">2</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">0.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">0</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : // -*- C++ -*-
<span class="lineNum">       2 </span>                : 
<span class="lineNum">       3 </span>                : // Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
<span class="lineNum">       4 </span>                : //
<span class="lineNum">       5 </span>                : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       6 </span>                : // software; you can redistribute it and/or modify it under the terms
<span class="lineNum">       7 </span>                : // of the GNU General Public License as published by the Free Software
<span class="lineNum">       8 </span>                : // Foundation; either version 3, or (at your option) any later
<span class="lineNum">       9 </span>                : // version.
<span class="lineNum">      10 </span>                : 
<span class="lineNum">      11 </span>                : // This library is distributed in the hope that it will be useful, but
<span class="lineNum">      12 </span>                : // WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      13 </span>                : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
<span class="lineNum">      14 </span>                : // General Public License for more details.
<span class="lineNum">      15 </span>                : 
<span class="lineNum">      16 </span>                : // Under Section 7 of GPL version 3, you are granted additional
<span class="lineNum">      17 </span>                : // permissions described in the GCC Runtime Library Exception, version
<span class="lineNum">      18 </span>                : // 3.1, as published by the Free Software Foundation.
<span class="lineNum">      19 </span>                : 
<span class="lineNum">      20 </span>                : // You should have received a copy of the GNU General Public License and
<span class="lineNum">      21 </span>                : // a copy of the GCC Runtime Library Exception along with this program;
<span class="lineNum">      22 </span>                : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<span class="lineNum">      23 </span>                : // &lt;http://www.gnu.org/licenses/&gt;.
<span class="lineNum">      24 </span>                : 
<span class="lineNum">      25 </span>                : /** @file ext/type_traits.h
<span class="lineNum">      26 </span>                :  *  This file is a GNU extension to the Standard C++ Library.
<span class="lineNum">      27 </span>                :  */
<span class="lineNum">      28 </span>                : 
<span class="lineNum">      29 </span>                : #ifndef _EXT_TYPE_TRAITS
<span class="lineNum">      30 </span>                : #define _EXT_TYPE_TRAITS 1
<span class="lineNum">      31 </span>                : 
<span class="lineNum">      32 </span>                : #pragma GCC system_header
<span class="lineNum">      33 </span>                : 
<span class="lineNum">      34 </span>                : #include &lt;bits/c++config.h&gt;
<span class="lineNum">      35 </span>                : #include &lt;bits/cpp_type_traits.h&gt;
<span class="lineNum">      36 </span>                : 
<span class="lineNum">      37 </span>                : _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
<span class="lineNum">      38 </span>                : 
<span class="lineNum">      39 </span>                :   // Define a nested type if some predicate holds.
<span class="lineNum">      40 </span>                :   template&lt;bool, typename&gt;
<span class="lineNum">      41 </span>                :     struct __enable_if 
<span class="lineNum">      42 </span>                :     { };
<span class="lineNum">      43 </span>                : 
<span class="lineNum">      44 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">      45 </span>                :     struct __enable_if&lt;true, _Tp&gt;
<span class="lineNum">      46 </span>                :     { typedef _Tp __type; };
<span class="lineNum">      47 </span>                : 
<span class="lineNum">      48 </span>                : 
<span class="lineNum">      49 </span>                :   // Conditional expression for types. If true, first, if false, second.
<span class="lineNum">      50 </span>                :   template&lt;bool _Cond, typename _Iftrue, typename _Iffalse&gt;
<span class="lineNum">      51 </span>                :     struct __conditional_type
<span class="lineNum">      52 </span>                :     { typedef _Iftrue __type; };
<span class="lineNum">      53 </span>                : 
<span class="lineNum">      54 </span>                :   template&lt;typename _Iftrue, typename _Iffalse&gt;
<span class="lineNum">      55 </span>                :     struct __conditional_type&lt;false, _Iftrue, _Iffalse&gt;
<span class="lineNum">      56 </span>                :     { typedef _Iffalse __type; };
<span class="lineNum">      57 </span>                : 
<span class="lineNum">      58 </span>                : 
<span class="lineNum">      59 </span>                :   // Given an integral builtin type, return the corresponding unsigned type.
<span class="lineNum">      60 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">      61 </span>                :     struct __add_unsigned
<span class="lineNum">      62 </span>                :     { 
<span class="lineNum">      63 </span>                :     private:
<span class="lineNum">      64 </span>                :       typedef __enable_if&lt;std::__is_integer&lt;_Tp&gt;::__value, _Tp&gt; __if_type;
<span class="lineNum">      65 </span>                :       
<span class="lineNum">      66 </span>                :     public:
<span class="lineNum">      67 </span>                :       typedef typename __if_type::__type __type; 
<span class="lineNum">      68 </span>                :     };
<span class="lineNum">      69 </span>                : 
<span class="lineNum">      70 </span>                :   template&lt;&gt;
<span class="lineNum">      71 </span>                :     struct __add_unsigned&lt;char&gt;
<span class="lineNum">      72 </span>                :     { typedef unsigned char __type; };
<span class="lineNum">      73 </span>                : 
<span class="lineNum">      74 </span>                :   template&lt;&gt;
<span class="lineNum">      75 </span>                :     struct __add_unsigned&lt;signed char&gt;
<span class="lineNum">      76 </span>                :     { typedef unsigned char __type; };
<span class="lineNum">      77 </span>                : 
<span class="lineNum">      78 </span>                :   template&lt;&gt;
<span class="lineNum">      79 </span>                :     struct __add_unsigned&lt;short&gt;
<span class="lineNum">      80 </span>                :     { typedef unsigned short __type; };
<span class="lineNum">      81 </span>                : 
<span class="lineNum">      82 </span>                :   template&lt;&gt;
<span class="lineNum">      83 </span>                :     struct __add_unsigned&lt;int&gt;
<span class="lineNum">      84 </span>                :     { typedef unsigned int __type; };
<span class="lineNum">      85 </span>                : 
<span class="lineNum">      86 </span>                :   template&lt;&gt;
<span class="lineNum">      87 </span>                :     struct __add_unsigned&lt;long&gt;
<span class="lineNum">      88 </span>                :     { typedef unsigned long __type; };
<span class="lineNum">      89 </span>                : 
<span class="lineNum">      90 </span>                :   template&lt;&gt;
<span class="lineNum">      91 </span>                :     struct __add_unsigned&lt;long long&gt;
<span class="lineNum">      92 </span>                :     { typedef unsigned long long __type; };
<span class="lineNum">      93 </span>                : 
<span class="lineNum">      94 </span>                :   // Declare but don't define.
<span class="lineNum">      95 </span>                :   template&lt;&gt;
<span class="lineNum">      96 </span>                :     struct __add_unsigned&lt;bool&gt;;
<span class="lineNum">      97 </span>                : 
<span class="lineNum">      98 </span>                :   template&lt;&gt;
<span class="lineNum">      99 </span>                :     struct __add_unsigned&lt;wchar_t&gt;;
<span class="lineNum">     100 </span>                : 
<span class="lineNum">     101 </span>                : 
<span class="lineNum">     102 </span>                :   // Given an integral builtin type, return the corresponding signed type.
<span class="lineNum">     103 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     104 </span>                :     struct __remove_unsigned
<span class="lineNum">     105 </span>                :     { 
<span class="lineNum">     106 </span>                :     private:
<span class="lineNum">     107 </span>                :       typedef __enable_if&lt;std::__is_integer&lt;_Tp&gt;::__value, _Tp&gt; __if_type;
<span class="lineNum">     108 </span>                :       
<span class="lineNum">     109 </span>                :     public:
<span class="lineNum">     110 </span>                :       typedef typename __if_type::__type __type; 
<span class="lineNum">     111 </span>                :     };
<span class="lineNum">     112 </span>                : 
<span class="lineNum">     113 </span>                :   template&lt;&gt;
<span class="lineNum">     114 </span>                :     struct __remove_unsigned&lt;char&gt;
<span class="lineNum">     115 </span>                :     { typedef signed char __type; };
<span class="lineNum">     116 </span>                : 
<span class="lineNum">     117 </span>                :   template&lt;&gt;
<span class="lineNum">     118 </span>                :     struct __remove_unsigned&lt;unsigned char&gt;
<span class="lineNum">     119 </span>                :     { typedef signed char __type; };
<span class="lineNum">     120 </span>                : 
<span class="lineNum">     121 </span>                :   template&lt;&gt;
<span class="lineNum">     122 </span>                :     struct __remove_unsigned&lt;unsigned short&gt;
<span class="lineNum">     123 </span>                :     { typedef short __type; };
<span class="lineNum">     124 </span>                : 
<span class="lineNum">     125 </span>                :   template&lt;&gt;
<span class="lineNum">     126 </span>                :     struct __remove_unsigned&lt;unsigned int&gt;
<span class="lineNum">     127 </span>                :     { typedef int __type; };
<span class="lineNum">     128 </span>                : 
<span class="lineNum">     129 </span>                :   template&lt;&gt;
<span class="lineNum">     130 </span>                :     struct __remove_unsigned&lt;unsigned long&gt;
<span class="lineNum">     131 </span>                :     { typedef long __type; };
<span class="lineNum">     132 </span>                : 
<span class="lineNum">     133 </span>                :   template&lt;&gt;
<span class="lineNum">     134 </span>                :     struct __remove_unsigned&lt;unsigned long long&gt;
<span class="lineNum">     135 </span>                :     { typedef long long __type; };
<span class="lineNum">     136 </span>                : 
<span class="lineNum">     137 </span>                :   // Declare but don't define.
<span class="lineNum">     138 </span>                :   template&lt;&gt;
<span class="lineNum">     139 </span>                :     struct __remove_unsigned&lt;bool&gt;;
<span class="lineNum">     140 </span>                : 
<span class="lineNum">     141 </span>                :   template&lt;&gt;
<span class="lineNum">     142 </span>                :     struct __remove_unsigned&lt;wchar_t&gt;;
<span class="lineNum">     143 </span>                : 
<span class="lineNum">     144 </span>                : 
<span class="lineNum">     145 </span>                :   // For use in string and vstring.
<span class="lineNum">     146 </span>                :   template&lt;typename _Type&gt;
<span class="lineNum">     147 </span>                :     inline bool
<span class="lineNum">     148 </span><span class="lineNoCov">              0 :     __is_null_pointer(_Type* __ptr)</span>
<span class="lineNum">     149 </span><span class="lineNoCov">              0 :     { return __ptr == 0; }</span>
<span class="lineNum">     150 </span>                : 
<span class="lineNum">     151 </span>                :   template&lt;typename _Type&gt;
<span class="lineNum">     152 </span>                :     inline bool
<span class="lineNum">     153 </span>                :     __is_null_pointer(_Type)
<span class="lineNum">     154 </span>                :     { return false; }
<span class="lineNum">     155 </span>                : 
<span class="lineNum">     156 </span>                : 
<span class="lineNum">     157 </span>                :   // For complex and cmath
<span class="lineNum">     158 </span>                :   template&lt;typename _Tp, bool = std::__is_integer&lt;_Tp&gt;::__value&gt;
<span class="lineNum">     159 </span>                :     struct __promote
<span class="lineNum">     160 </span>                :     { typedef double __type; };
<span class="lineNum">     161 </span>                : 
<span class="lineNum">     162 </span>                :   template&lt;typename _Tp&gt;
<span class="lineNum">     163 </span>                :     struct __promote&lt;_Tp, false&gt;
<span class="lineNum">     164 </span>                :     { typedef _Tp __type; };
<span class="lineNum">     165 </span>                : 
<span class="lineNum">     166 </span>                :   template&lt;typename _Tp, typename _Up&gt;
<span class="lineNum">     167 </span>                :     struct __promote_2
<span class="lineNum">     168 </span>                :     {
<span class="lineNum">     169 </span>                :     private:
<span class="lineNum">     170 </span>                :       typedef typename __promote&lt;_Tp&gt;::__type __type1;
<span class="lineNum">     171 </span>                :       typedef typename __promote&lt;_Up&gt;::__type __type2;
<span class="lineNum">     172 </span>                : 
<span class="lineNum">     173 </span>                :     public:
<span class="lineNum">     174 </span>                :       typedef __typeof__(__type1() + __type2()) __type;
<span class="lineNum">     175 </span>                :     };
<span class="lineNum">     176 </span>                : 
<span class="lineNum">     177 </span>                :   template&lt;typename _Tp, typename _Up, typename _Vp&gt;
<span class="lineNum">     178 </span>                :     struct __promote_3
<span class="lineNum">     179 </span>                :     {
<span class="lineNum">     180 </span>                :     private:
<span class="lineNum">     181 </span>                :       typedef typename __promote&lt;_Tp&gt;::__type __type1;
<span class="lineNum">     182 </span>                :       typedef typename __promote&lt;_Up&gt;::__type __type2;
<span class="lineNum">     183 </span>                :       typedef typename __promote&lt;_Vp&gt;::__type __type3;
<span class="lineNum">     184 </span>                : 
<span class="lineNum">     185 </span>                :     public:
<span class="lineNum">     186 </span>                :       typedef __typeof__(__type1() + __type2() + __type3()) __type;
<span class="lineNum">     187 </span>                :     };
<span class="lineNum">     188 </span>                : 
<span class="lineNum">     189 </span>                :   template&lt;typename _Tp, typename _Up, typename _Vp, typename _Wp&gt;
<span class="lineNum">     190 </span>                :     struct __promote_4
<span class="lineNum">     191 </span>                :     {
<span class="lineNum">     192 </span>                :     private:
<span class="lineNum">     193 </span>                :       typedef typename __promote&lt;_Tp&gt;::__type __type1;
<span class="lineNum">     194 </span>                :       typedef typename __promote&lt;_Up&gt;::__type __type2;
<span class="lineNum">     195 </span>                :       typedef typename __promote&lt;_Vp&gt;::__type __type3;
<span class="lineNum">     196 </span>                :       typedef typename __promote&lt;_Wp&gt;::__type __type4;
<span class="lineNum">     197 </span>                : 
<span class="lineNum">     198 </span>                :     public:
<span class="lineNum">     199 </span>                :       typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
<span class="lineNum">     200 </span>                :     };
<span class="lineNum">     201 </span>                : 
<span class="lineNum">     202 </span>                : _GLIBCXX_END_NAMESPACE
<span class="lineNum">     203 </span>                : 
<span class="lineNum">     204 </span>                : #endif 
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
